﻿@model IEnumerable<KRM.Core.tblbanner>

@if (Model.Any())
{
    var count = 0;
    foreach (var item in Model)
    {
        count++;
        var banneri = "banner-" + item.Id;
    <div id="col1" class="span6 column ui-state-default @banneri">
        <input type="hidden" id="bannerid" value="@item.Id" />
        <!-- Portlet: Fancy Portlets -->
        <div id="box" class="box">
            <h5 class="box-header"><span>@item.Title</span>
                <a title="close" class="box-btn btn-deletebanner" rel="@item.Id"><i class="icon-remove"></i></a>
                <a href="JavaScript:void(0);" onclick="BannerManager.bannerPopup(@item.Id); return false; " title="edit" class="box-btn">
                    <i class="icon-edit edit-banner" rel="@item.Id"></i>
                </a>
            </h5>
            <div class="box-container-toggle">
                <div class="box-content">
                    <img src="@item.ImageUrl" alt="@item.Title"/>
                    @{
        string startdate = "";
        string enddate = "";
        if (string.Format("{0:yyyy/MM/dd}", item.StartDate) != "9999/09/09")
        {
            startdate = string.Format("{0:yyyy/MM/dd/ HH:mm}", item.StartDate);
        }
        if (string.Format("{0:yyyy/MM/dd}", item.EndDate) != "9999/09/09")
        {
            enddate = string.Format("{0:yyyy/MM/dd/ HH:mm}", item.EndDate);
        }
        if (startdate != "" && enddate != "")
        {
                        <div class="datetime">@startdate - @enddate</div>
        }
                    }
                </div>
            </div>
        </div>
    </div>

    }
}